package com.cqemme.comm.enums;


import java.util.HashMap;
import java.util.Map;

/**
 * 通知消息类型--用于通知消息发送辨别
 * @author amkj
 */

public enum EnumNoticeTypes {
    ALL( 0,"全局通知消息"),
    EDUCATION(1,"教委通知消息"),
    SCHOOL(2,"学校消息"),
    CLASS(3,"班级消息"),
    PEOPLE(4,"指定人消息");

    private final String name;
    private final int idx;


    EnumNoticeTypes(int idx, String name ){
        this.name = name;
        this.idx = idx;
    }
    

    public String getName() {
        return this.name;
    }

    public int getIdx() {
        return this.idx;
    }



    public static Map<String,String> getMap() {
        Map<String,String> map=new HashMap<String,String>();
        EnumNoticeTypes[] p = values();
        for (EnumNoticeTypes type : p) {
            map.put(String.valueOf(type.getIdx()), type.getName());
        }
        return map;
    }
    public static Map<Integer,String> getRealMap() {
        Map<Integer,String> map=new HashMap<Integer,String>();
        EnumNoticeTypes[] p = values();
        for (EnumNoticeTypes type : p) {
            map.put(type.getIdx(), type.getName());
        }
        return map;
    }
}
